Web Notes: read / re-file / delete notes from the dashboard#23
Conversation
PR 4 of the chat→web + notes rework. The Notes tab becomes an organizer: - notes.py: get_note(relpath), move_note(relpath, category), delete_note(relpath) — all via the existing _vault_subpath containment guard + a new _safe_relpath traversal guard. list_recent_notes/search_notes now also return a vault-relative `relpath` so the browser can address a note. - ffp_daemon.py: note_get, note_move [W], note_delete [W]. - Dashboard: notes rows are clickable → a reader pane shows the title, source link, and full body, with a bucket dropdown (Move) + Delete. All DOM via textContent/createElement; the reader addresses notes by relpath only and the daemon re-validates containment server-side. 19 new tests (notes get/move/delete + traversal rejection); daemon action-count 56→59. ruff + 207 tests + node --check all green. CHANGELOG updated for the full chat→web + notes-organizer work. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4bef8ffbb0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| dest.write_text(text, encoding="utf-8") | ||
| src.unlink() |
There was a problem hiding this comment.
Make pending moves update the capture worker
When this runs on a newly captured note whose _categorize_in_background thread is still running (common for URL notes while fetch/LLM work is in progress), it copies the stub to the new bucket and unlinks the original, but the background worker still has stub_path and later writes a final note via _write_note(...) even if the stub was moved. The result is two notes: the moved (categorizing…) stub plus the final LLM-filed note, so the user's re-file is not authoritative. Please coordinate with the worker, such as by recording the moved path or marking the stub as user-managed before removing it.
Useful? React with 👍 / 👎.
| target = _vault_subpath(*safe.split("/")) | ||
| if not target.exists(): | ||
| return {"ok": False, "error": "note not found"} | ||
| target.unlink() |
There was a problem hiding this comment.
Make pending deletes cancel background categorization
When deleting a freshly captured note before its _categorize_in_background thread finishes, especially for URL captures, this only removes the inbox stub; the worker still has the note contents and later writes a final note with _write_note(...). The deleted note therefore reappears in another bucket after the user removed it. Please record a cancellation/tombstone or have the worker stop when the stub is gone.
Useful? React with 👍 / 👎.
PR 4 (final) of chat→web + notes rework. The Notes tab becomes an organizer:
click a note to read its body + source, move it to another bucket, or delete it.
notes.get_note/move_note/delete_note(_vault_subpathcontainment +_safe_relpathtraversal guard); list/search now return a vault-relativerelpath.note_get/note_move[W] /note_delete[W] (re-validate containment).19 new tests; daemon action-count 56→59; ruff + 207 tests +
node --checkgreen.A
workflow_dispatchbuild after merge verifies the 3-exe freeze + ships the artifact.